﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Glucometer
{
    public enum HardwareInterrupt
    {
        BUTTON_UP,
        BUTTON_DOWN,
        USB_INSERTED,
        USB_REMOVED,
        STRIP_INSERTED,
        STRIP_REMOVED,
        AC_PLUGGED_IN,
        AC_PLUGGED_OUT,
        VALID_STRIP,
        INVALID_STRIP,
        SUFFICIENT_BLOOD,
        INSUFFICIENT_BLOOD,
        RESULT_READY,
        BATTERY_LEVEL_DOWN,
        BATTERY_LEVEL_UP,
        TIME_TICK,
        NONE
    }

    public enum HardwareStatus
    { 
        AC_PLUGGED_IN,
        USB_INSERTED,
        TEST_STRIP_INSERTED,
        IS_VALID_TEST_STRIP
    }

    public enum DisplayComponent
    {
        DEVICE_MODE_BROWSING,
        DEVICE_MODE_UPLOADING,
        DEVICE_MODE_TESTING,
        DEVICE_MODE_ERROR,
        BATTERY,
        NONE,
        DEVICE_MODE_SETUP
    }

    public delegate void d_Interrupt(HardwareInterrupt interrupt);

    public interface IHarware
    {
        event d_Interrupt RaiseInterrupt;

        void DisplayResult(int result, TestUnit unit);

        void SetDeviceMode(OperationMode mode);

        void ShowDisplay(string p);

        void ShowProgress(int progress);

        void showCurrentRecord(string str);

        void BlinkComponent(DisplayComponent comp);

        void BlinkSetupPosition(SetupModePosition position);

        void UpdateSetupPositionValue(SetupModePosition pos, String c);

        void DisplayErrorCode(int _lastError);

        bool getStatus(HardwareStatus status);

        void updateDateTime(DateTime dt);

        void ShowAcSymbol(bool visible);

        void ShowBatteryLevel(int level);

        void ShowMode(DisplayComponent displayComponent);

        void BlinkMode(OperationMode operationMode);
    }
}